package top.wuyang.springboot3.schoolTimetable.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;
import top.wuyang.springboot3.validate.CommonValidate;

import java.io.Serial;
import java.io.Serializable;

/**
 * 教师信息表
 */
@Data
@TableName("tb_teacher_info")
public class TbTeacherInfo implements Serializable {
    @Serial
    private static final long serialVersionUID = 1L;

    // 主键标识，自增主键
    @TableId(type = IdType.AUTO)
    private Integer id;
    @NotBlank(message = "教师名称不能为空", groups = {CommonValidate.Add.class, CommonValidate.Edit.class})
    private String tname; // 教师名称
    @NotBlank(message = "教师简介不能为空", groups = {CommonValidate.Add.class, CommonValidate.Edit.class})
    private String intro; // 教师简介
}
